home *** CD-ROM | disk | FTP | other *** search
-
-
-
- GGGGEEEETTTTIIIINNNNVVVVEEEENNNNTTTT((((3333)))) GGGGEEEETTTTIIIINNNNVVVVEEEENNNNTTTT((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- getinvent, setinvent, endinvent, scaninvent, getinvent_r, setinvent_r,
- endinvent_r - get hardware inventory entry
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<iiiinnnnvvvveeeennnntttt....hhhh>>>>
-
- iiiinnnnvvvveeeennnnttttoooorrrryyyy____tttt ****ggggeeeettttiiiinnnnvvvveeeennnntttt ((((vvvvooooiiiidddd))));;;;
-
- iiiinnnntttt sssseeeettttiiiinnnnvvvveeeennnntttt ((((vvvvooooiiiidddd))));;;;
-
- vvvvooooiiiidddd eeeennnnddddiiiinnnnvvvveeeennnntttt ((((vvvvooooiiiidddd))));;;;
-
- iiiinnnnvvvveeeennnnttttoooorrrryyyy____tttt ****ggggeeeettttiiiinnnnvvvveeeennnntttt____rrrr ((((iiiinnnnvvvv____ssssttttaaaatttteeee____tttt ****sssstttt))));;;;
-
- iiiinnnntttt sssseeeettttiiiinnnnvvvveeeennnntttt____rrrr ((((iiiinnnnvvvv____ssssttttaaaatttteeee____tttt ********sssstttt))));;;;
-
- vvvvooooiiiidddd eeeennnnddddiiiinnnnvvvveeeennnntttt____rrrr ((((iiiinnnnvvvv____ssssttttaaaatttteeee____tttt ****sssstttt))));;;;
-
- iiiinnnntttt ssssccccaaaannnniiiinnnnvvvveeeennnntttt ((((iiiinnnntttt ((((****))))((((iiiinnnnvvvveeeennnnttttoooorrrryyyy____tttt ****,,,, vvvvooooiiiidddd ****)))),,,, vvvvooooiiiidddd ****))));;;;
-
- iiiinnnntttt ____kkkkeeeeeeeeppppiiiinnnnvvvveeeennnntttt;;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _g_e_t_i_n_v_e_n_t returns a pointer to an object with the following structure
- containing an entry from the system hardware inventory table. Each entry
- in the table contains an ``inventory'' structure, declared in the
- <_s_y_s/_i_n_v_e_n_t._h> header file:
-
- typedef struct inventory_s {
- struct inventory_s *inv_next;
- int inv_class;
- int inv_type;
- char inv_controller;
- char inv_unit;
- long inv_state;
- } inventory_t;
-
-
- Each inventory entry is described by a _c_l_a_s_s and a class-specific _t_y_p_e.
- The remaining fields provide further information on the inventory entry.
- See the comments in the header file for an explanation of these fields.
- The <_i_n_v_e_n_t._h> header file includes <_s_y_s/_i_n_v_e_n_t._h>, and should be
- included before calling inventory functions.
-
- _g_e_t_i_n_v_e_n_t when first called returns a pointer to the first inventory
- structure in the table; thereafter, it returns a pointer to the next
- inventory structure in the table; so successive calls can be used to
- search the entire table.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- GGGGEEEETTTTIIIINNNNVVVVEEEENNNNTTTT((((3333)))) GGGGEEEETTTTIIIINNNNVVVVEEEENNNNTTTT((((3333))))
-
-
-
- A call to _s_e_t_i_n_v_e_n_t has the effect of rewinding the table to allow
- repeated searches. It should always be called before calling _g_e_t_i_n_v_e_n_t.
- _e_n_d_i_n_v_e_n_t may be called to free allocated storage when processing is
- complete.
-
- A reentrant version of these functions also exists. These should be used
- in multi-threaded applications where the shared data implicit in the
- functions described above is inappropriate. The reentrant version
- requires that a state structure _i_n_v__s_t_a_t_e__t be initialized via
- _s_e_t_i_n_v_e_n_t__r and passed to _g_e_t_i_n_v_e_n_t__r and _e_n_d_i_n_v_e_n_t__r. The first time
- _s_e_t_i_n_v_e_n_t__r is called, its parameter should be the address of a pointer
- initialized to _NNNN_UUUU_LLLL_LLLL. Subsequent calls to _s_e_t_i_n_v_e_n_t__r with the
- initialized pointer have the effect of rewinding the table to allow
- repeated searches. This structure holds a pointer to the data and the
- current location in the data, and therefore permits multiple threads to
- call the functions simultaneously with no possibility of losing data.
-
- _s_c_a_n_i_n_v_e_n_t applies fun to each inventory entry, passing the entry's
- address and arg to fun. If fun returns a non-zero value, _s_c_a_n_i_n_v_e_n_t
- stops scanning and returns that value. Otherwise _s_c_a_n_i_n_v_e_n_t returns 0
- after scanning all entries. _s_c_a_n_i_n_v_e_n_t normally calls _e_n_d_i_n_v_e_n_t before
- returning. To prevent this call, set __k_e_e_p_i_n_v_e_n_t to a non-zero value.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- _g_e_t_i_n_v_e_n_t and _g_e_t_i_n_v_e_n_t__r return a NNNNUUUULLLLLLLL pointer when they have read all
- entries. _s_e_t_i_n_v_e_n_t and _s_e_t_i_n_v_e_n_t__r return -1 on failure. _s_c_a_n_i_n_v_e_n_t
- returns -1 if it cannot successfully _s_e_t_i_n_v_e_n_t or _s_e_t_i_n_v_e_n_t__r before
- scanning.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-